Repository navigation
chore: drop Python modules superseded by Rust (refs #59) - #62
Merged
Merged
Conversation
Project is now Rust-first; this pass cuts the Python dep list from 8 to 4 runtime deps and drops modules whose work the Rust crates now own. Removed modules - src/fastled/paths.py — HERE/PROJECT_ROOT constants, zero importers. - src/fastled/filewatcher.py — file watching is now owned by the Rust CLI. Comments in compile_native.py already say so. The only inbound reference was the unit test below. - tests/unit/test_filechanger.py — cascading; only consumer of FileWatcherProcess. Dropped dependencies (pyproject.toml) - watchdog — only used by filewatcher.py. - watchfiles — declared but never imported anywhere. - disklru — never imported. - zccache — never imported. - progress — replaced by a stdlib itertools.cycle-based spinner. - rapidfuzz — replaced by difflib.SequenceMatcher with a token-sort wrapper that matches the previous fuzz.token_sort_ratio shape. All 23 string-diff unit tests pass (including the 600-line comprehensive suite). Dropped from requirements.testing.txt - fastapi — declared but never imported anywhere in the repo. Kept (still live, with non-trivial callers) - httpx — 6 callsites for downloads and local-server probes. - fasteners — InterProcessLock for installer concurrency in 2 places. - clang-tool-chain — emscripten installer integration. - zcmds_win32 — Windows-only git-bash bundle for debug symbol resolution. Linters and the full unit-test suite are green after this change (118 passed, 1 skipped).
zackees
force-pushed
the
chore/issue-59-remove-python-superseded-by-rust
branch
from
May 12, 2026 23:47
9a0608d to
80073c0
Compare
This was referenced May 13, 2026
zackees
added a commit
that referenced
this pull request
May 13, 2026
Sweeps the non-Python items issue #59 flagged that are still on main after PRs #61, #62, #64, #65, #66, #68 cleaned up the Python side: * `entrypoint.sh` — Docker container entrypoint. Sourced `/emsdk/emsdk_env.sh` (container path) and called `fastled_wasm_compiler.cli_update_from_master` (a module from a separate package that only exists inside the container). * `compiler/run.py` — Docker compile-server entry point. Imports `fastled_wasm_compiler`, a separate package not in this repo. * `compiler/debug.sh` — instructed user to run from `/js` (container working directory). Empty `compiler/` directory removed. * `.dockerignore` — only contained cache exclusions (`**/.mypy_cache/`, `**/.ruff_cache/`) which belong in `.gitignore` if anywhere; no Docker build context this could serve. * `chrome_vscode_bridge_design_task.md` — one-off design draft that opens with "Here's a refined ... file for your repo. Feel free to adjust...". Zero references anywhere else. * `upload_package.sh` — manual PyPI upload helper, superseded by the automated `publish_release.yml` workflow. Zero inbound references. * Empty root-level `fastled/` directory left over from a prior layout. `lint` script updated to stop passing the (now-deleted) `compiler/` path to ruff / black / isort / pyright / the keyboard-interrupt checker. `bash lint` clean. `bash test` — 119 pass. Verified by grep across `*.py`, `*.rs`, `*.toml`, `*.yml`, `*.sh`, `*.md`, `Cargo.toml` (excluding `.venv/` and `.claude/worktrees/`): none of the deleted files are referenced from a live code path or workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aggressive Python footprint shrink. Phase 1 cleared dead Python and dep cruft. Phase 2+ moves the HTTP downloads themselves from Python into Rust so httpx and pyzstd stop being on the Python critical path.
Issue: #59 (#59 (comment))
Commits in this PR
chore: shrink Python footprint after Rust migration— removed dead modules (paths.py,filewatcher.py, its lone test) and replacedprogress+rapidfuzzwith stdlib.chore(open_browser): drop redundant wait_for_server HTTP probe— Rust prints its URL once it's listening, so the follow-up httpx GET added nothing.chore(rust): own emscripten install in the Rust CLI— newcrates/fastled-cli/src/install.rsdoes manifest fetch + multipart download + SHA-256 verify +.tar.zstextract +.emscriptenconfig. Wired intocompile_and_servebefore invoking Python; setsFASTLED_EMSCRIPTEN_DIR. Dropsclang-tool-chainandpyzstd.chore(rust): own esbuild install in the Rust CLI— same shape for the esbuild npm tarball. Dropsfasteners(last user removed too).Net dep change
Python runtime: 8 → 2 deps
watchdog,watchfiles,disklru,zccache,progress,rapidfuzz,clang-tool-chain,fastenershttpx,zcmds_win32(Windows-only)What still keeps httpx alive
src/fastled/project_init.py—--initflow downloads the FastLED repo zip from GitHub. Needs a Rustensure_fastled_repo()port +Api.project_init()flow rework. Real Rust work, not a chore step.src/fastled/playwright/chrome_extension_downloader.py— runtime Chrome-extension fetch for the Tauri viewer's C++ DevTools. Needs a Rust port + Tauri-side trigger.These are tractable in follow-up PRs that each touch a distinct subsystem.
Rust additions
ctcb-manifest = "0.4.1"workspace dep — reuses the manifest schema from the existingclang-tool-chain-binscrate ecosystem instead of re-rolling it.flate2,dirsworkspace deps.Test plan
bash lintclean (cargo check + ruff + pyright all green)bash test— 118 passed, 1 skipped, 0 failures~/.fastled/toolchains/emscripten/...~/.fastled/toolchains/esbuild/...Refs #59
🤖 Generated with Claude Code